﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="FlowManagement.aspx.cs" Inherits="bts_webapp.FlowManagement" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2011.2.915.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


    <div style="clear:both;"><h2>Quản lý luồng</h2></div>
    <div style="clear:both; width:99%;">
        <asp:ScriptManager ID="scriptMan" runat="server" />

        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Windows7" />
        <div style="width:1000px; overflow:scroll;">
        <telerik:RadGrid runat="server" ID="RadGrid1" Skin="Windows7" AutoGenerateColumns="false" OnItemCommand="RadGrid1_ItemCommand"
            AllowPaging="true" OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"
            OnItemCreated="RadGrid1_ItemCreated" OnDeleteCommand="RadGrid1_DeleteCommand" AllowSorting="true"
            OnInsertCommand="RadGrid1_InsertCommand" OnItemDataBound="RadGrid1_ItemDataBound" AllowFilteringByColumn="True">
            
            <MasterTableView  CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage" >
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="ColumnEdit" />

                    <telerik:GridBoundColumn DataField="Luong_Id" HeaderText="Mã luồng" UniqueName="Luong_Id" SortExpression="Luong_Id" Visible="false" />
                    <telerik:GridBoundColumn DataField="Luong_Ten" HeaderText="Tên luồng" UniqueName="Luong_Ten" SortExpression="Luong_Ten" />
                    
                    <telerik:GridBoundColumn DataField="Luong_Id_Tram_Di" HeaderText="Trạm đi" UniqueName="Luong_Id_Tram_Di" SortExpression="Luong_Id_Tram_Di" Visible="False" />
                    <telerik:GridBoundColumn DataField="TenTramDi" HeaderText="Tên trạm đi" UniqueName="TenTramDi" SortExpression ="TenTramDi" />

                    <telerik:GridBoundColumn DataField="Luong_ThietBi_Di" HeaderText="Thiết bị đi" UniqueName="Luong_ThietBi_Di" SortExpression="Luong_ThietBi_Di" Visible="False" />
                    <telerik:GridBoundColumn HeaderText="Tên thiết bị đi" UniqueName="TenThietbiDi" />

                    <telerik:GridBoundColumn DataField="Luong_Card_Di" HeaderText="Card đi" UniqueName="Luong_Card_Di" SortExpression="Luong_Card_Di" Visible="False" />
                    <telerik:GridBoundColumn HeaderText="Card đi" UniqueName="TenCardDi" />
                    
                    <telerik:GridBoundColumn DataField="Luong_Id_Tram_Den" HeaderText="Trạm đến" UniqueName="Luong_Id_Tram_Den" SortExpression="Luong_Id_Tram_Den" Visible="False" />
                    <telerik:GridBoundColumn HeaderText="Tên trạm đến" UniqueName="TenTramDen" />

                    <telerik:GridBoundColumn DataField="Luong_ThietBi_Den" HeaderText="Thiết bị đến" UniqueName="Luong_ThietBi_Den" SortExpression="Luong_ThietBi_Den" Visible="False" />
                    <telerik:GridBoundColumn HeaderText="Thiết bị đến" UniqueName="TenThietbiDen" />
                    
                    <telerik:GridBoundColumn DataField="Luong_Card_Den" HeaderText="Card đến" UniqueName="Luong_Card_Den" SortExpression="Luong_Card_Den" Visible="False" />
                    <telerik:GridBoundColumn HeaderText="Card đến" UniqueName="TenCardDen" />

                    <telerik:GridBoundColumn DataField="Luong_Port_Di" HeaderText="Port đi" UniqueName="Luong_Port_Di" SortExpression="Luong_Port_Di"/>
                    <telerik:GridBoundColumn DataField="Luong_Port_Den" HeaderText="Port đến" UniqueName="Luong_Port_Den" SortExpression="Luong_Port_Den" />
                    
                    <telerik:GridBoundColumn DataField="Luong_Lich_Su_Duong_Di" HeaderText="Lich su" UniqueName="Luong_Lich_Su_Duong_Di" SortExpression="Luong_Lich_Su_Duong_Di"/>
                    <telerik:GridBoundColumn DataField="Luong_GhiChu" HeaderText="Nội dung ghi chú" UniqueName="Luong_GhiChu" SortExpression="Luong_GhiChu"/>
                    <telerik:GridBoundColumn DataField="Status" HeaderText="Trạng thái" UniqueName="Status" SortExpression="Status" AllowFiltering="false" />

                    <telerik:GridButtonColumn ConfirmText="Bạn có muốn xóa luồng này ?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" UniqueName="ColumnDelete" />
                </Columns>
                <EditFormSettings EditFormType="WebUserControl" UserControlName="~/UxFlow.ascx">
                    <EditColumn ButtonType="ImageButton" />
                </EditFormSettings>
            </MasterTableView>
            
            <PagerStyle Mode="NextPrevNumericAndAdvanced" />
            
        </telerik:RadGrid>
        </div>
    </div>

</asp:Content>
